// The form contains fields for many pagiantion optiosn so you can 
// quickly see the resuluts of the different options.
// This function creates an option object for the pagination function.
// This will be be unnecessary in your application where you just set
// the options once.
$(function() {
		$("#post_comment_button").click(function(){
		var comment = $("#topic_comment_text").val();
                if(comment.length > 0) {
                        $("#topic_comment_text").attr("value", '');
                        comment = comment.replace('\n', '<br />');
                        $.ajax({
                                type: "POST",
                                url: "/topic/comment",
                                data: {
                                comm_id: $("#comm_id").val(),
                                topic_id: $("#topicid").val(),
                                comment: comment,
                                type: "get"},
                                success: function(html)
                                {
					$("#comment_div").html(html);
					$.prettyDate.now = function() {
						return new Date();
					}
					$(".prettyDate").prettyDate();
					
                                }
                        });
                }
        });


});
